package com.yisu.expressway.network;

/**
 * Created by theodore on 16/9/20.
 */
public class ApiSetting {

    private static String baseUrl;

    public static void setmNetworkUrl(String url) {
        baseUrl = url;
    }

    private static String genUrl(String api) {
        String url = new okhttp3.Request.Builder().url(baseUrl + api).build().url().toString();
        return url;
    }

    /**
     * 检测app版本是否需要升级
     *
     * @return
     */
    public static String checkVersion() {
        return genUrl("/setting/checkVersion");
    }

    /**
     *获取开机页广告
     */
    public static String getLoadPage() {
        return genUrl("/ad/startPageAd");
    }

    /**
     * 获取附近服务器列表
     */
    public static String getNearByServiceDistrictList() {
        return genUrl("/service/serviceAreaList");
    }

    /**
     * 获取服务器详情
     */
    public static String getServiceDistrictDetail() {
        return genUrl("/service/serviceAreaDetail");
    }

    /**
     * 获取店铺详情
     */
    public static String getShopDetail() {
        return genUrl("/service/shopDetail");
    }

    /**
     * 获取商品种类
     */
    public static String getShopCategory() {
        return genUrl("/shopping/categoryList");
    }

    /**
     * 获取商品列表
     */
    public static String getGoodsList() {
        return genUrl("/shopping/productList");
    }

    /**
     * 获取附近加油站列表
     */
    public static String getNearByGasStation() {
        return genUrl("/service/gasStationList");
    }

    /**
     * 登陆
     */
    public static String loginIn() {
        return genUrl("/user/login");
    }

    /**
     * 获取验证码
     */
    public static String getVerifyCode() {
        return genUrl("/user/sendValidateCode");
    }

    /**
     * 退出登录
     */
    public static String logout() {
        return genUrl("/user/logout");
    }

    /**
     * 获取景区详情
     */
    public static String getScenicSpotDetail() {
        return genUrl("/service/viewSpotDetail");
    }

    /**
     * 修改用户信息
     */
    public static String modifyUserProfile() {
        return genUrl("/user/modifyProfile");
    }

    /**
     * 获取七牛token
     */
    public static String getQiniuToken() {
        return genUrl("/config/qiNiuUploadToken");
    }

    /**
     * 获取汽车类型列表
     */
    public static String getCarTypeList() {
        return genUrl("/service/carTypeList");
    }

    /**
     * 查询汽车违章
     */
    public static String queryCarBreakRule() {
        return genUrl("/service/carBreakRule");
    }

    /**
     * 用户意见反馈
     */
    public static String uploadUserAdvice() {
        return genUrl("/user/leaveMessage");
    }

    /**
     * 获取系统配置
     */
    public static String getSystemConfig() {
        return genUrl("/common/systemConfig");
    }

    /**
     * 搜索服务区
     */
    public static String searchDistrict() {
        return genUrl("/service/searchServiceArea");
    }

    /**
     *一元夺宝列表——商品列表
     */
    public static String querySaleGoodsList() {
        return genUrl("/salesgoods/querySaleGoodsList");
    }

    /**
     *一元夺宝列表-banner及通知
     */
    public static String querySaleGoodsBannerInfo() {
        return genUrl("/salesgoods/querySaleGoodsBannerInfo");
    }

    /**
     *最近揭晓列表
     */
    public static String getRecentlyAnnounced() {
        return genUrl("/winningrecord/getRecentlyAnnounced");
    }

    /**
     *获取一元夺宝商品详情接口
     */
    public static String getGoodsInfo() {
        return genUrl("/goods/getGoodsInfo");
    }

    /**
     *一元夺宝往期揭晓列表
     */
    public static String getWinningRecordHistoryList() {
        return genUrl("/winningrecord/getWinningRecordHistoryList");
    }

    /**
     *获取订单晒单详情接口
     */
    public static String getOrderShowInfo() {
        return genUrl("/order/getOrderShowInfo");
    }

    /**
     *【晒单】往期晒单列表——通过系统商品条码获取
     */
    public static String getOrderShowList() {
        return genUrl("/order/getOrderShowList");
    }

    /**
     *【配置】获取一元秒商品购买上限相关配置
     */
    public static String getBuyNumConfig() {
        return genUrl("/config/buyNumConfig");
    }

    /**
     *【配置】获取一元秒商品购买上限相关配置
     */
    public static String orderShow() {
        return genUrl("/order/orderShow");
    }

    /**
     *  我的抢购商品列表接口
     */
    public static String getMyOrderList() {
        return genUrl("/order/myorderlist");
    }

    /**
     *  创建一元秒订单
     */
    public static String createOrder() {
        return genUrl("/order/CreateOrder");
    }

    /**
     *  取消一元秒订单
     */
    public static String cancleOrder() {
        return genUrl("/order/CancleOrder");
    }

    /**
     *  修改用户支付方式
     */
    public static String changeOrderPayment() {
        return genUrl("/order/ChangeOrderPayment");
    }

    /**
    *  获取我的晒单记录
    */
    public static String getMyOrderShowInfo() {
        return genUrl("/order/getMyOrderShowInfo");
    }

    /**
     * 获取更多电话列表
     */
    public static String getContactNumberList(){
        return genUrl("/home/hotLineList");
    }

    /**
     * 用户收货地址列表接口
     * @return
     */
    public static String getUserAddressList() {
        return genUrl("/userAddress/list");
    }

    /**
     * 修改用户收货地址列表接口
     * @return
     */
    public static String updateUserAddress() {
        return genUrl("/userAddress/update");
    }

    /**
     * 删除用户收货地址列表接口
     * @return
     */
    public static String deleteUserAddress() {
        return genUrl("/userAddress/delete");
    }

    /**
     * 插入用户收货地址列表接口
     * @return
     */
    public static String insertUserAddress() {
        return genUrl("/userAddress/insert");
    }
    /**
     *  获取全国地区联动
     * @return
     */
    public static String getCountryAreaForLinkage() {
        return genUrl("/countryarea/getCountryAreaForLinkage");
    }

    /**
     * 首页公告and Bannar
     */
    public static String getHomeBannerList(){
        return genUrl("/home/bannerList");
    }

    /**
     *  修改一元秒订单收货地址接口
     * @return
     */
    public static String changeOrderAddress() {
        return genUrl("/order/ChangeOrderAddress");
    }

    /**
     *  获取一元秒订单详情接口
     * @return
     */
    public static String getOrderDetail() {
        return genUrl("/order/orderDetail");
    }

    /**
     * 获取天气
     */
    public static String getWeather(){
        return genUrl("/weather/weatherInfo");
    }

    /**
     * 获取最热话题列表
     */
    public static String getTodayHottestTopicList(){
        return genUrl("/home/getHotTopic");
    }

    /**
     * 一元秒物流信息
     */
    public static String getLogisticsInfo(){
        return genUrl("/order/LogisticsInfo");
    }

	/**
     * 获取支付信息
     * @return
     */
    public static String getPaymentData(){
        return genUrl("/order/getPaymentData");
    }

	/**
	 * 获取支付信息
	 * @return
	 */
	public static String getChargeUrl(){
		return genUrl("/order/getPaymentData");
	}


    /**
     * 获取幸运号计算规则
     * @return
     */
    public static String getWinningAlgorithm(){
        return genUrl("/order/getWinningAlgorithm");
    }

    /**
     * 获取订单对应的幸运号
     * @return
     */
    public static String getLuckyNumByOrderId(){
        return genUrl("/luckyNumber/getListByOrderId");
    }

    /**
     * 获取高速救援，高速收费信息
     */
    public static String getHighWayInfo(){
        return genUrl("/voiceAutoQuestion/getVoiceAutoQuestion");
    }

    /**
     * 查询条码
     */
    public static String getCodeUrl(){
        return genUrl("/goods/getProductBarcodeLinkByScan");
    }

    /**
     * 发布新的车友爆料直播
     */
    public static String postNewLive(){
        return genUrl("/ridersBrokeNews/createRidersBrokeNews");
    }

    /**
     * 获取车友爆料主题列表
     */
    public static String getLiveList(){
        return genUrl("/ridersBrokeNews/getRidersBrokeNewsList");
    }

    /**
     * 获取爆料直播间列表
     */
    public static String getLiveItemList(){
        return genUrl("/ridersBrokeNews/getRidersBrokeNewsDetailList");
    }

    /**
     * 发送爆料内容
     */
    public static String sendLiveContent(){
        return genUrl("/ridersBrokeNews/addRidersBrokeNewsDetail");
    }

    /**
     * 删除自己发送的爆料内容
     */
    public static String deleteSelectContent(){
        return genUrl("/ridersBrokeNews/delRidersBrokeNewsDetail");
    }

    /**
     * 查询自己发起直播间所有未读消息数
     */
    public static String getUnreadMsgCount(){
        return genUrl("/ridersBrokeNews/getRedDotNumByUserAccount");
    }

    /**
     * 打开关闭未读数通知
     */
    public static String switchUnReadMsgRecord(){
        return genUrl("/ridersBrokeNews/updateRedDotSwitch");
    }

}
